package org.jeecg.modules.param.member.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.param.member.entity.BikeMemberChargeReturn;
import org.jeecg.modules.param.member.mapper.BikeMemberChargeReturnMapper;
import org.jeecg.modules.param.member.service.IBikeMemberChargeReturnService;
import org.jeecg.modules.param.member.vo.ChargeReturnReq;
import org.jeecg.modules.param.member.vo.ChargeReturnRsp;
import org.jeecg.modules.utils.ExcelUtils;
import org.springframework.stereotype.Service;
import org.springframework.web.servlet.ModelAndView;


import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: 充值退款记录
 * @Author: jeecg-boot
 * @Date:   2021-11-08
 * @Version: V1.0
 */
@Service
public class BikeMemberChargeReturnServiceImpl extends ServiceImpl<BikeMemberChargeReturnMapper, BikeMemberChargeReturn> implements IBikeMemberChargeReturnService {
        @Resource
    private BikeMemberChargeReturnMapper bikeMemberChargeReturnMapper;
    @Override
    public IPage<ChargeReturnRsp> queryPageList(Integer pageNo, Integer pageSize, ChargeReturnReq chargeReturnReq) {
        Page<ChargeReturnRsp> page = new Page<>(pageNo, pageSize);
        return bikeMemberChargeReturnMapper.queryPageList(page,chargeReturnReq);
    }

    @Override
    public ModelAndView exportXls(HttpServletRequest request) {
        List<ChargeReturnRsp> list = bikeMemberChargeReturnMapper.getList();
        return ExcelUtils.exportXls(request,list,ChargeReturnRsp.class,"充值退款记录表");
    }
}
